from util.baseView import BaseView
from selenium.webdriver.common.by import By
import time

class ModeSetting(BaseView):
    def __init__(self,driver):
        BaseView.__init__(self,driver)
        self.bth_irs = (By.ID,'com.sykean.biometrics:id/btn_iris')
        self.bth_face = (By.ID,'com.sykean.biometrics:id/btn_face')
        self.bth_ic = (By.ID, 'com.sykean.biometrics:id/btn_ic')
        self.btn_iris_face= (By.ID,'com.sykean.biometrics:id/btn_iris_face')
        self.btn_ic_iris = (By.ID, 'com.sykean.biometrics:id/btn_ic_iris')
        self.btn_ic_face = (By.ID, 'com.sykean.biometrics:id/btn_ic_face')
        self.back = (By.ID, 'com.sykean.biometrics:id/btn_back')

    def test_irsChoice(self):
        self.click_element(*self.bth_irs)
        time.sleep(5)
    def test_faceChoice(self):
        self.click_element(*self.bth_face)
        time.sleep(5)
    def test_icChoice(self):
        self.click_element(*self.bth_ic)
        time.sleep(5)
    def test_irs_faceChoice(self):
        self.click_element(*self.btn_iris_face)
        time.sleep(5)
    def test_ic_irsChoice(self):
        self.click_element(*self.btn_ic_iris)
        time.sleep(5)
    def test_ic_faceChoice(self):
        self.click_element(*self.btn_ic_face)
        time.sleep(5)
        self.click_element(*self.back)

    def test_runAll(self):
        self.test_irsChoice()
        self.test_faceChoice()
        self.test_irs_faceChoice()
        self.test_ic_irsChoice()
        self.test_ic_faceChoice()









